Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrap LLD into python #898

Open
wants to merge 172 commits into
base: main
Choose a base branch
from
Open

Wrap LLD into python #898

wants to merge 172 commits into from

Conversation

ArachnidAbby
Copy link

@ArachnidAbby ArachnidAbby commented Jan 11, 2023

Based on: Add dependency on LLD, wrap it into python

todo:

  • Bring the old pr up-to-date with the 800 commits made to llvmlite since the pr opened
  • Fix any broken code from the original pr
  • add .binding.lld module with functions for each platform lld supports
  • complete remaining items on the original PR
  • add documentation for any newly added functions

items remaining in the original PR

  • Make all Travis tests pass, test LLD on 64bit linux
  • Write a test for 32 bits linux? Currently only 64 bits are tested. (not required)
  • Get it to compile on macOS
  • Get it to compile on Windows
  • Get the PyPy test working (not required)
  • Implement LLD for macOS and test it
  • Implement LLD for Windows and test it
    (all non-required items are going to be checked off)

I will update you as I complete items.

certik and others added 28 commits January 26, 2019 14:40
This fixes the following link errors:

.../miniconda3/envs/build/conda-bld/lld_1542237425154/_build_env/bin/../lib/gcc/x86_64-conda_cos6-linux-gnu/7.3.0/../../../../x86_64-conda_cos6-linux-gnu/bin/ld: ../../lib/liblldCOFF.a(MapFile.cpp.o):(.data.rel.ro._ZTIN4llvm13format_objectIJmmmEEE[_ZTIN4llvm13format_objectIJmmmEEE]+0x10): undefined reference to `typeinfo for llvm::format_object_base'
For now we just call lld::elf::link.
This is a temporary workaround to get it working. We have to figure out how to
obtain these automatically.
@gmarkall
Copy link
Member

Many thanks for opening this PR!

@ArachnidAbby
Copy link
Author

Okay, going to try a different approach. I'm going to see if I can rebuild the conda recipe for lld. I think that would ensure that they are both compiled using the same set of libraries and what not. Idk if its gonna work, but its worth a shot at least once right?

@ArachnidAbby
Copy link
Author

I got it working! Finally! Now it just needs review. And I work from home now so feel free to contact me thru here if you all need to me to modify anything or fix anything for the next update.

@esc
Copy link
Member

esc commented Feb 4, 2025

@ArachnidAbby this is "pretty dope" -- I much appreciate the attention to detail and your INSANE level of persistence. I was just able to skim in this current session, what hints would you have for the reviewers? Is there anything specific I could test or try or should I look out for something?

@esc
Copy link
Member

esc commented Feb 5, 2025

@ArachnidAbby I ran this through the Anaconda internal "build farm" and this fails to compile on linux-aarch64. I'll post the error below. I would also like to add that the "build farm" is a historical artifact from a time where no "public CI" system was suited to run the Numba/llvmlite tests and builds. This is something I am currently working on with @swap357 and @dbast and we hope to bring some high-quality GHA workflows online soon such that we can test contributions like yours in public. Until then I'll have to ferry your builds through the "build farm" manually and report back any issues I find. The current HEAD of this branch resulted in:

running build
got version from VCS {'version': '0.45.0dev0+218.g60582b9', 'full': '60582b9d400c79166400d74f34214cea13e25e8b'}
running build_ext
$PREFIX/bin/python $SRC_DIR/ffi/build.py
LLVM version... $BUILD_PREFIX/bin/aarch64-conda-linux-gnu-c++ -c -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem $PREFIX/include -fvisibility-inlines-hidden -std=c++17 -fmessage-length=0 -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O3 -pipe -isystem $PREFIX/include -fdebug-prefix-map=$SRC_DIR=/usr/local/src/conda/llvmlite-0.45.0dev0 -fdebug-prefix-map=$PREFIX=/usr/local/src/conda-prefix -fPIC -I$PREFIX/include -std=c++14 -fno-exceptions -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -fno-rtti -g -DHAVE_SVML -flto -fPIC assembly.cpp -o assembly.o
$BUILD_PREFIX/bin/aarch64-conda-linux-gnu-c++ -c -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem $PREFIX/include -fvisibility-inlines-hidden -std=c++17 -fmessage-length=0 -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O3 -pipe -isystem $PREFIX/include -fdebug-prefix-map=$SRC_DIR=/usr/local/src/conda/llvmlite-0.45.0dev0 -fdebug-prefix-map=$PREFIX=/usr/local/src/conda-prefix -fPIC -I$PREFIX/include -std=c++14 -fno-exceptions -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -fno-rtti -g -DHAVE_SVML -flto -fPIC bitcode.cpp -o bitcode.o
type.cpp: In function 'LLVMOpaqueType* LLVMPY_GetElementType(LLVMTypeRef)':
type.cpp:159:52: warning: 'llvm::Type* llvm::Type::getPointerElementType() const' is deprecated: Deprecated without replacement, see https://llvm.org/docs/OpaquePointers.html for context and migration instructions [-Wdeprecated-declarations]
159 |         return llvm::wrap(ty->getPointerElementType());
|                           ~~~~~~~~~~~~~~~~~~~~~~~~~^~
In file included from /opt/conda/conda-bld/llvmlite_1738699759326/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_plac/include/llvm/IR/DerivedTypes.h:23,
from type.cpp:7:
/opt/conda/conda-bld/llvmlite_1738699759326/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_plac/include/llvm/IR/Type.h:380:9: note: declared here
380 |   Type *getPointerElementType() const {
|         ^~~~~~~~~~~~~~~~~~~~~
targets.cpp: In function 'long long int LLVMPY_ABISizeOfElementType(LLVMTargetDataRef, LLVMTypeRef)':
targets.cpp:130:35: warning: 'llvm::Type* llvm::Type::getPointerElementType() const' is deprecated: Deprecated without replacement, see https://llvm.org/docs/OpaquePointers.html for context and migration instructions [-Wdeprecated-declarations]
130 |     tp = tp->getPointerElementType();
|          ~~~~~~~~~~~~~~~~~~~~~~~~~^~
In file included from /opt/conda/conda-bld/llvmlite_1738699759326/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_plac/include/llvm/IR/DerivedTypes.h:23,
from /opt/conda/conda-bld/llvmlite_1738699759326/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_plac/include/llvm/IR/InstrTypes.h:28,
from /opt/conda/conda-bld/llvmlite_1738699759326/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_plac/include/llvm/Analysis/TargetLibraryInfo.h:15,
from targets.cpp:6:
/opt/conda/conda-bld/llvmlite_1738699759326/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_plac/include/llvm/IR/Type.h:380:9: note: declared here
380 |   Type *getPointerElementType() const {
|         ^~~~~~~~~~~~~~~~~~~~~
targets.cpp: In function 'long long int LLVMPY_ABIAlignmentOfElementType(LLVMTargetDataRef, LLVMTypeRef)':
targets.cpp:140:35: warning: 'llvm::Type* llvm::Type::getPointerElementType() const' is deprecated: Deprecated without replacement, see https://llvm.org/docs/OpaquePointers.html for context and migration instructions [-Wdeprecated-declarations]
140 |     tp = tp->getPointerElementType();
|          ~~~~~~~~~~~~~~~~~~~~~~~~~^~
In file included from /opt/conda/conda-bld/llvmlite_1738699759326/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_plac/include/llvm/IR/DerivedTypes.h:23,
from /opt/conda/conda-bld/llvmlite_1738699759326/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_plac/include/llvm/IR/InstrTypes.h:28,
from /opt/conda/conda-bld/llvmlite_1738699759326/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_plac/include/llvm/Analysis/TargetLibraryInfo.h:15,
from targets.cpp:6:
/opt/conda/conda-bld/llvmlite_1738699759326/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_plac/include/llvm/IR/Type.h:380:9: note: declared here
380 |   Type *getPointerElementType() const {
|         ^~~~~~~~~~~~~~~~~~~~~
$BUILD_PREFIX/bin/aarch64-conda-linux-gnu-c++ -c -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem $PREFIX/include -fvisibility-inlines-hidden -std=c++17 -fmessage-length=0 -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O3 -pipe -isystem $PREFIX/include -fdebug-prefix-map=$SRC_DIR=/usr/local/src/conda/llvmlite-0.45.0dev0 -fdebug-prefix-map=$PREFIX=/usr/local/src/conda-prefix -fPIC -I$PREFIX/include -std=c++14 -fno-exceptions -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -fno-rtti -g -DHAVE_SVML -flto -fPIC core.cpp -o core.o
$BUILD_PREFIX/bin/aarch64-conda-linux-gnu-c++ -c -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem $PREFIX/include -fvisibility-inlines-hidden -std=c++17 -fmessage-length=0 -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O3 -pipe -isystem $PREFIX/include -fdebug-prefix-map=$SRC_DIR=/usr/local/src/conda/llvmlite-0.45.0dev0 -fdebug-prefix-map=$PREFIX=/usr/local/src/conda-prefix -fPIC -I$PREFIX/include -std=c++14 -fno-exceptions -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -fno-rtti -g -DHAVE_SVML -flto -fPIC initfini.cpp -o initfini.o
$BUILD_PREFIX/bin/aarch64-conda-linux-gnu-c++ -c -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem $PREFIX/include -fvisibility-inlines-hidden -std=c++17 -fmessage-length=0 -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O3 -pipe -isystem $PREFIX/include -fdebug-prefix-map=$SRC_DIR=/usr/local/src/conda/llvmlite-0.45.0dev0 -fdebug-prefix-map=$PREFIX=/usr/local/src/conda-prefix -fPIC -I$PREFIX/include -std=c++14 -fno-exceptions -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -fno-rtti -g -DHAVE_SVML -flto -fPIC module.cpp -o module.o
$BUILD_PREFIX/bin/aarch64-conda-linux-gnu-c++ -c -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem $PREFIX/include -fvisibility-inlines-hidden -std=c++17 -fmessage-length=0 -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O3 -pipe -isystem $PREFIX/include -fdebug-prefix-map=$SRC_DIR=/usr/local/src/conda/llvmlite-0.45.0dev0 -fdebug-prefix-map=$PREFIX=/usr/local/src/conda-prefix -fPIC -I$PREFIX/include -std=c++14 -fno-exceptions -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -fno-rtti -g -DHAVE_SVML -flto -fPIC value.cpp -o value.o
$BUILD_PREFIX/bin/aarch64-conda-linux-gnu-c++ -c -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem $PREFIX/include -fvisibility-inlines-hidden -std=c++17 -fmessage-length=0 -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O3 -pipe -isystem $PREFIX/include -fdebug-prefix-map=$SRC_DIR=/usr/local/src/conda/llvmlite-0.45.0dev0 -fdebug-prefix-map=$PREFIX=/usr/local/src/conda-prefix -fPIC -I$PREFIX/include -std=c++14 -fno-exceptions -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -fno-rtti -g -DHAVE_SVML -flto -fPIC executionengine.cpp -o executionengine.o
$BUILD_PREFIX/bin/aarch64-conda-linux-gnu-c++ -c -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem $PREFIX/include -fvisibility-inlines-hidden -std=c++17 -fmessage-length=0 -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O3 -pipe -isystem $PREFIX/include -fdebug-prefix-map=$SRC_DIR=/usr/local/src/conda/llvmlite-0.45.0dev0 -fdebug-prefix-map=$PREFIX=/usr/local/src/conda-prefix -fPIC -I$PREFIX/include -std=c++14 -fno-exceptions -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -fno-rtti -g -DHAVE_SVML -flto -fPIC transforms.cpp -o transforms.o
$BUILD_PREFIX/bin/aarch64-conda-linux-gnu-c++ -c -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem $PREFIX/include -fvisibility-inlines-hidden -std=c++17 -fmessage-length=0 -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O3 -pipe -isystem $PREFIX/include -fdebug-prefix-map=$SRC_DIR=/usr/local/src/conda/llvmlite-0.45.0dev0 -fdebug-prefix-map=$PREFIX=/usr/local/src/conda-prefix -fPIC -I$PREFIX/include -std=c++14 -fno-exceptions -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -fno-rtti -g -DHAVE_SVML -flto -fPIC passmanagers.cpp -o passmanagers.o
$BUILD_PREFIX/bin/aarch64-conda-linux-gnu-c++ -c -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem $PREFIX/include -fvisibility-inlines-hidden -std=c++17 -fmessage-length=0 -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O3 -pipe -isystem $PREFIX/include -fdebug-prefix-map=$SRC_DIR=/usr/local/src/conda/llvmlite-0.45.0dev0 -fdebug-prefix-map=$PREFIX=/usr/local/src/conda-prefix -fPIC -I$PREFIX/include -std=c++14 -fno-exceptions -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -fno-rtti -g -DHAVE_SVML -flto -fPIC targets.cpp -o targets.o
$BUILD_PREFIX/bin/aarch64-conda-linux-gnu-c++ -c -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem $PREFIX/include -fvisibility-inlines-hidden -std=c++17 -fmessage-length=0 -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O3 -pipe -isystem $PREFIX/include -fdebug-prefix-map=$SRC_DIR=/usr/local/src/conda/llvmlite-0.45.0dev0 -fdebug-prefix-map=$PREFIX=/usr/local/src/conda-prefix -fPIC -I$PREFIX/include -std=c++14 -fno-exceptions -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -fno-rtti -g -DHAVE_SVML -flto -fPIC type.cpp -o type.o
$BUILD_PREFIX/bin/aarch64-conda-linux-gnu-c++ -c -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem $PREFIX/include -fvisibility-inlines-hidden -std=c++17 -fmessage-length=0 -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O3 -pipe -isystem $PREFIX/include -fdebug-prefix-map=$SRC_DIR=/usr/local/src/conda/llvmlite-0.45.0dev0 -fdebug-prefix-map=$PREFIX=/usr/local/src/conda-prefix -fPIC -I$PREFIX/include -std=c++14 -fno-exceptions -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -fno-rtti -g -DHAVE_SVML -flto -fPIC dylib.cpp -o dylib.o
$BUILD_PREFIX/bin/aarch64-conda-linux-gnu-c++ -c -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem $PREFIX/include -fvisibility-inlines-hidden -std=c++17 -fmessage-length=0 -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O3 -pipe -isystem $PREFIX/include -fdebug-prefix-map=$SRC_DIR=/usr/local/src/conda/llvmlite-0.45.0dev0 -fdebug-prefix-map=$PREFIX=/usr/local/src/conda-prefix -fPIC -I$PREFIX/include -std=c++14 -fno-exceptions -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -fno-rtti -g -DHAVE_SVML -flto -fPIC linker.cpp -o linker.o
$BUILD_PREFIX/bin/aarch64-conda-linux-gnu-c++ -c -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem $PREFIX/include -fvisibility-inlines-hidden -std=c++17 -fmessage-length=0 -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O3 -pipe -isystem $PREFIX/include -fdebug-prefix-map=$SRC_DIR=/usr/local/src/conda/llvmlite-0.45.0dev0 -fdebug-prefix-map=$PREFIX=/usr/local/src/conda-prefix -fPIC -I$PREFIX/include -std=c++14 -fno-exceptions -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -fno-rtti -g -DHAVE_SVML -flto -fPIC object_file.cpp -o object_file.o
$BUILD_PREFIX/bin/aarch64-conda-linux-gnu-c++ -c -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem $PREFIX/include -fvisibility-inlines-hidden -std=c++17 -fmessage-length=0 -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O3 -pipe -isystem $PREFIX/include -fdebug-prefix-map=$SRC_DIR=/usr/local/src/conda/llvmlite-0.45.0dev0 -fdebug-prefix-map=$PREFIX=/usr/local/src/conda-prefix -fPIC -I$PREFIX/include -std=c++14 -fno-exceptions -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -fno-rtti -g -DHAVE_SVML -flto -fPIC custom_passes.cpp -o custom_passes.o
$BUILD_PREFIX/bin/aarch64-conda-linux-gnu-c++ -c -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem $PREFIX/include -fvisibility-inlines-hidden -std=c++17 -fmessage-length=0 -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O3 -pipe -isystem $PREFIX/include -fdebug-prefix-map=$SRC_DIR=/usr/local/src/conda/llvmlite-0.45.0dev0 -fdebug-prefix-map=$PREFIX=/usr/local/src/conda-prefix -fPIC -I$PREFIX/include -std=c++14 -fno-exceptions -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -fno-rtti -g -DHAVE_SVML -flto -fPIC orcjit.cpp -o orcjit.o
/opt/conda/conda-bld/llvmlite_1738699759326/_build_env/bin/../lib/gcc/aarch64-conda-linux-gnu/11.2.0/../../../../aarch64-conda-linux-gnu/bin/ld: /opt/conda/conda-bld/llvmlite_1738699759326/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_plac/lib/liblldCommon.a(ErrorHandler.cpp.o): in function `std::_Function_handler<bool (char), std::__detail::_BracketMatcher<std::__cxx11::regex_traits<char>, false, false> >::_M_manager(std::_Any_data&, std::_Any_data const&, std::_Manager_operation)':
ErrorHandler.cpp:(.text._ZNSt17_Function_handlerIFbcENSt8__detail15_BracketMatcherINSt7__cxx1112regex_traitsIcEELb0ELb0EEEE10_M_managerERSt9_Any_dataRKS8_St18_Manager_operation[_ZNSt17_Function_handlerIFbcENSt8__detail15_BracketMatcherINSt7__cxx1112regex_traitsIcEELb0ELb0EEEE10_M_managerERSt9_Any_dataRKS8_St18_Manager_operation]+0x114): undefined reference to `std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >::vector(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&)'
/opt/conda/conda-bld/llvmlite_1738699759326/_build_env/bin/../lib/gcc/aarch64-conda-linux-gnu/11.2.0/../../../../aarch64-conda-linux-gnu/bin/ld: /opt/conda/conda-bld/llvmlite_1738699759326/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_plac/lib/liblldCommon.a(ErrorHandler.cpp.o): in function `std::_Function_handler<bool (char), std::__detail::_BracketMatcher<std::__cxx11::regex_traits<char>, false, true> >::_M_manager(std::_Any_data&, std::_Any_data const&, std::_Manager_operation)':
ErrorHandler.cpp:(.text._ZNSt17_Function_handlerIFbcENSt8__detail15_BracketMatcherINSt7__cxx1112regex_traitsIcEELb0ELb1EEEE10_M_managerERSt9_Any_dataRKS8_St18_Manager_operation[_ZNSt17_Function_handlerIFbcENSt8__detail15_BracketMatcherINSt7__cxx1112regex_traitsIcEELb0ELb1EEEE10_M_managerERSt9_Any_dataRKS8_St18_Manager_operation]+0x120): undefined reference to `std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >::vector(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&)'
/opt/conda/conda-bld/llvmlite_1738699759326/_build_env/bin/../lib/gcc/aarch64-conda-linux-gnu/11.2.0/../../../../aarch64-conda-linux-gnu/bin/ld: /opt/conda/conda-bld/llvmlite_1738699759326/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_plac/lib/liblldCommon.a(ErrorHandler.cpp.o): in function `std::_Function_handler<bool (char), std::__detail::_BracketMatcher<std::__cxx11::regex_traits<char>, true, false> >::_M_manager(std::_Any_data&, std::_Any_data const&, std::_Manager_operation)':
ErrorHandler.cpp:(.text._ZNSt17_Function_handlerIFbcENSt8__detail15_BracketMatcherINSt7__cxx1112regex_traitsIcEELb1ELb0EEEE10_M_managerERSt9_Any_dataRKS8_St18_Manager_operation[_ZNSt17_Function_handlerIFbcENSt8__detail15_BracketMatcherINSt7__cxx1112regex_traitsIcEELb1ELb0EEEE10_M_managerERSt9_Any_dataRKS8_St18_Manager_operation]+0x114): undefined reference to `std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >::vector(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&)'
/opt/conda/conda-bld/llvmlite_1738699759326/_build_env/bin/../lib/gcc/aarch64-conda-linux-gnu/11.2.0/../../../../aarch64-conda-linux-gnu/bin/ld: /opt/conda/conda-bld/llvmlite_1738699759326/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_plac/lib/liblldCommon.a(ErrorHandler.cpp.o): in function `std::_Function_handler<bool (char), std::__detail::_BracketMatcher<std::__cxx11::regex_traits<char>, true, true> >::_M_manager(std::_Any_data&, std::_Any_data const&, std::_Manager_operation)':
ErrorHandler.cpp:(.text._ZNSt17_Function_handlerIFbcENSt8__detail15_BracketMatcherINSt7__cxx1112regex_traitsIcEELb1ELb1EEEE10_M_managerERSt9_Any_dataRKS8_St18_Manager_operation[_ZNSt17_Function_handlerIFbcENSt8__detail15_BracketMatcherINSt7__cxx1112regex_traitsIcEELb1ELb1EEEE10_M_managerERSt9_Any_dataRKS8_St18_Manager_operation]+0x120): undefined reference to `std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > >::vector(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&)'
collect2: error: ld returned 1 exit status
make: *** [Makefile.linux:28: libllvmlite.so] Error 1
Traceback (most recent call last):
File "/opt/conda/conda-bld/llvmlite_1738699759326/work/ffi/build.py", line 268, in <module>
main()
File "/opt/conda/conda-bld/llvmlite_1738699759326/work/ffi/build.py", line 256, in main
main_posix('linux', '.so')
File "/opt/conda/conda-bld/llvmlite_1738699759326/work/ffi/build.py", line 247, in main_posix
subprocess.check_call(['make', '-f', makefile] + makeopts)
File "/opt/conda/conda-bld/llvmlite_1738699759326/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_plac/lib/python3.12/subprocess.py", line 413, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['make', '-f', 'Makefile.linux', '-j4']' returned non-zero exit status 2.
error: command '/opt/conda/conda-bld/llvmlite_1738699759326/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_plac/bin/python' failed with exit code 1

BuildScriptException: Command '['/bin/bash', '-o', 'errexit', '/opt/conda/conda-bld/llvmlite_1738699759326/work/conda_build.sh']' returned non-zero exit status 1.

@ArachnidAbby
Copy link
Author

ArachnidAbby commented Feb 6, 2025

@esc Thats really odd that it does that. Does this run all of the same steps that the ci/cd pipeline does? Or does this run a different set of scripts? Because this same issue happened, and I thought I had fixed it in the ci/cd pipeline. So I'm a little confused

edit: also, is this using llvm15 or 16? and from which channel?

@esc
Copy link
Member

esc commented Feb 6, 2025

@esc Thats really odd that it does that. Does this run all of the same steps that the ci/cd pipeline does? Or does this run a different set of scripts? Because this same issue happened, and I thought I had fixed it in the ci/cd pipeline. So I'm a little confused

Not sure, probably very similar though. I do know however that the Azure pipelines don't run linux-aarch64 tests at all.

edit: also, is this using llvm15 or 16? and from which channel?

This uses the llvmdev from the numba channel on anaconda.org: https://anaconda.org/numba/llvmdev -- so LLVM 15.

@ArachnidAbby
Copy link
Author

@esc Thats really odd that it does that. Does this run all of the same steps that the ci/cd pipeline does? Or does this run a different set of scripts? Because this same issue happened, and I thought I had fixed it in the ci/cd pipeline. So I'm a little confused

Not sure, probably very similar though. I do know however that the Azure pipelines don't run linux-aarch64 tests at all.

edit: also, is this using llvm15 or 16? and from which channel?

This uses the llvmdev from the numba channel on anaconda.org: https://anaconda.org/numba/llvmdev -- so LLVM 15.

really odd that this issue would occur. But if its llvm15 it makes sense that the fix I made for llvm16 wouldn't be applied (it only applied it for llvm16 but I assume it should work fine for llvm15). Surprised that the numba channel one isn't working tbh.

I'm gonna try pushing a quick fix in a minute or two, and we can see if it works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow llvmlite to also link object code
6 participants